package com.fc.entity.input;

import com.fc.checkGroup.Insert;
import com.fc.checkGroup.Update;
import com.fc.entity.Category;
import com.fc.entity.ProductDetailImages;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ProductInput {

    @Schema(title = "id")
    @NotNull(message = "产品id不能为空", groups = Update.class)
    private Long id;

    @Schema(title = "产品名称")
    @NotBlank(message = "产品名称不能为空", groups = {Update.class, Insert.class})
    private String name;

    @Schema(title = "产品价格")
    @NotNull(message = "产品价格不能为空", groups = {Update.class, Insert.class})
    private BigDecimal price;

    @Schema(title = "库存数量")
    @NotNull(message = "库存数量不能为空", groups = {Update.class, Insert.class})
    private Integer stock;

    @Schema(title = "产品封面")
    @NotNull(message = "产品封面不能为空", groups = {Update.class, Insert.class})
    private String image;

    @Schema(title = "描述")
    private String description;

    @Schema(title = "产品详情图")
    private List<ProductDetailImages> detailImages;

    @Schema(title = "产品类别")
    @NotNull(message = "类别不能为空", groups = {Update.class, Insert.class})
    private List<Long> types;
}
